﻿using SaaS.Model.Enums;
using System;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;
using System.Text;
using XCore.Domain.Entities;

namespace SaaS.Model.Entity.Auths
{
    /// <summary>
    /// 商户后台用户表
    /// </summary>
    [Table("Adm_Users")]
    public class AdminUser : IEntity<int>
    {
        [Column("AdminId")]
        public int Id { get; set; }
        /// <summary>
        /// 用户名
        /// </summary>
        [StringLength(32)]
        [Required]
        public string UserName { get; set; }
        /// <summary>
        /// 姓名
        /// </summary>
        [StringLength(64)]
        [Required]
        public string Name { get; set; }
        /// <summary>
        /// 角色Id
        /// </summary>
        public int? RoleId { get; set; }
        /// <summary>
        /// 密码
        /// </summary>
        [StringLength(128)]
        [Required]
        public string Password { get; set; }
        /// <summary>
        /// 初始随机密码
        /// </summary>
        [StringLength(64)]
        public string InitPassword { get; set; }
        /// <summary>
        /// 秘钥
        /// </summary>
        [StringLength(128)]
        public string SecretKey { get; set; }
        /// <summary>
        /// 是否默认管理员
        /// </summary>
        public bool IsDefault { get; set; }
        /// <summary>
        /// 头像
        /// </summary>
        [StringLength(128)]
        public string Avatar { get; set; }
        /// <summary>
        /// 用户状态
        /// </summary>
        public UserStatus Status { get; set; }
    }
}
